/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Graph;

import java.util.Objects;

/**
 *
 * @author 江南才俊周涛涛
 */
public class Vnode {
    public double distence;
    public Integer name;

    public Vnode(Integer name,double distence) {
        this.distence = distence;
        this.name = name;
    }
    
    public boolean equals(Object temp){
        if(temp==this){
            return true;
        }
        if(!(temp instanceof Vnode)){
            return false;
        }
        Vnode v=(Vnode) temp;
        return name==v.name;
    }
    
    public int hashCode(){
        return Objects.hash(name);
    }
}
